<?php 
    $detail = $data['place'];
    
    $address = $detail['address'];
    $search = array("\r\n", "\n");
    $link = base_url(). "karaoke/".$detail['provinceid']."/".$detail['nameid'].".html";
?>
<style>
	#map_canvas {
	    height: 400px;
	 }
</style>


<div class="row-1 p-d-6">
    <div class="map-icon-inner">
        <img align="left" class="show-hide-map" src="/public/assets/images/icons/hide-map-marker.png" alt="map marker" width="18" height="28" />
        <span class="distance">Khoảng cách từ điểm này: <span class="km"></span><span>
    </div>
<!--    <span>Cách vị trí này 10 km</span>-->
    <div class="search-map-wrapper no-border">
		<button class="btn btn-primary float-r" id="btn-find-direction">Tìm đường</button>
        <input id="to-place" type="hidden" value="<?php echo str_replace($search, '', $address) ?>" />
		<input class="float-r"  type="text" name="from-place" id="from-place" placeholder="Nhập vị trí hiện tại để tìm đường đi" />
	</div>
</div>

<div class="row-1 m-t-10">
	<div id="map_canvas"></div>
</div>

<div class="row-1 m-t-10">
	<div class="col-12 col-sm-12 col-lg-12 item no-border">
	    <img class="clearfix" src="/public/static/karaoke/<?php echo $place['img']; ?>">
        <div class="detail-info">
            <h2><?php echo $place['name']; ?></h2>
            <h4><?php echo $place['address']; ?></h4>
            <h6><?php echo $place['phone']; ?></h6>
        </div>
        <a class="m-r-5" href="http://www.facebook.com/sharer.php?u=<?php echo $link; ?>" target="_blank" title="Share FB">
            <img width="34" height="34" alt="facebook icon" src="/public/assets/images/icons/facebook-icon.png">
        </a>

        <a href="https://twitter.com/share?url=<?php echo $link; ?>" target="_blank" title="Share Twitter">
            <img width="34" height="34" alt="twitter icon" src="/public/assets/images/icons/twitter-icon.png">
        </a>
        <div class="clearfix"></div>
	</div><!--/span-->
</div>

<!-- To set location in the first time -->
<input type="hidden" name="detail-address" id="detail-address" value="<?php echo str_replace($search, '', $address) ?>" />
<input type="hidden" name="detail-latitude" id="detail-latitude" value="<?php echo $detail['latitude']; ?>" />
<input type="hidden" name="detail-longitude" id="detail-longitude" value="<?php echo $detail['longitude']; ?>" />
